package upload

import (
	"io"
)

const (
	Local = "local"
	MinIO = "minio"
)

type FileStore interface {
	Upload(file io.Reader, filename string, fileSize int64, fileType string) (string, error)
	Delete(key string) error
	Get(key string) (io.Reader, error)

	//Close() error
}

func NewFileStore(storeType string) FileStore {
	switch storeType {
	case Local:
		return LocalFileStore{}
	case MinIO:
		return newMinIOStore()
	default:
		return LocalFileStore{}
	}
}
